package com.allwees.bs.c.module.user.mapper;

import com.allwees.bs.c.module.base.mapper.IMapper;
import com.allwees.bs.c.module.user.dto.UserDto;
import com.allwees.bs.c.module.user.entity.UserEntity;
import org.springframework.stereotype.Component;

import java.util.Objects;
@Component
public class UserMapper implements IMapper<UserDto, UserEntity>{

	@Override
	public UserDto entity2DTO(UserEntity entry) {
		
		if(Objects.isNull(entry)) {
			return null;
		}
		return new UserDto(entry);
	}
}
